package com.dys.tools;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    // 应用ID,您的APPID，是沙箱应用的APPID 不是商家的UID值
    public static String app_id = "2021000118695680";//

    // 私钥  去保存的本地私钥文件中查找
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD74qyFusHYmvw6YDRDpq0m826S8jGRGG9vLShk+Pp9kIx7OOwF8RGDzX7+dxpJh+Xx+HixD3vo45nqaORVyG6HsokwqWXhe3lvk/oN610434sSWJq4bk3/9KVhpLOnUCdKMYxYWWnlF9wVnKBJgyWh90+Q2NIUaLdySXsiBh4eSoU0VqMbIUHoaIZ+1ERIEjg32d0f5f6J+ogksFN/s25a2kiLXtZ85xcMLeGYwgAsdhbBM4LTkwy/DwAg7HhujNCyBotd3llwEjjaGdZvCia0PS9BUZgg0te+HPPlV+OThJI2O3upRL3YTh381qu22ti5fUzUnR0MM9B1aDRNoSWfAgMBAAECggEBAJPp32/EZNLi6F0LY4WamjG2X+dwzAStebqqpP7uaoJT4Pr3STqP/r4MbZfWrxwg7royNAWd1yDCjv7lS7jIM4gCIqftwgMwM/Z+yidkYGDmfM9wMqM9OxakPn3hbxJAcmISSJ0VHKdIZJhYWpPwrKe5CANCH9OWTquRVPp85zDXXbYUZytudrPh26F+I8Rujrc/HcGFe/ISFxhSrgvPdwcf8Gzis+x4LgRpFor9nyRGVv2tcL2alnMkCF9uqkitMQJ8kYNLQAnC8YzgZj+ElzlhW95Lk04PIqxE4CUTPIfKD7+vWaLwfbe4bnqg0zYii+xNlAfx0u0z+Mfz8LzKFKECgYEA/tvqH46Hggeif0HKp++K2TfFqO0WD+KHXkpK/k7XEuHUcQZx6WjYNEtmjTcXdgXFH0ca804QDpFa+GU7nhYFXvkKeHgF7h0f99RVq295sTVP6rppC689m66c73mlZh3NUCo0pB7lNJdkoCg5HiUeVk+IFqKBoerR906vo7fXyQ8CgYEA/QNZ93J1/N/Ah8WGDABjbf6+NSOJq9u2xB2U+mpKTTvRimeJTtBvDmmXRrsv2bBo7lmxA4La+k8UWM+DbAqBWmcs2/JyHDL2wVpds1tlOs5QWnXzG59dhsCk8H+anLr97LX9ZpT7cKPVBa0Ut4sWBjQDkHqkHo/RhWrHYXbsOnECgYBzezKbGfpM8SiwgR9S+TfxNVRbNxLIH9023HMeyJqr86hPjpwPJ3LQP1o4or3+vJ6VjaKonLap4zNVWompGFFWt4IHFFubiZbytUQcama55W5Q7iarJLzFzllOKdDIdLiTmow/0cAKFI+EArXe8vLMKT2BBCG5PK3nYcA0bxlYAQKBgG3GzXsqg3zjTDLcheuhI4LvG3IM6EfTvbnbp+76vSBDiwgFIjM7BmR3dfZvczR9cRmxercuSHqAYzChYME40aT6zSDlUZNgnWWJIsyWJBbeu0h0krVycO7tmOLsSpYkH9ZbpAWlMG9P9jZPQYTdaQHqAX3naFwGRH8htD5ajeZRAoGBANegeqIMiDs2UVfTUCtTzmcvmFndJ0dWPsdmzDYE+REmQoFIlXSaGsIdzuRZf5v/V5T5E9SbtoLx//u7alZFXQqbB4O1SWSDrbsD/D462n0DvBwgknVjuCqtrJ+4U1RUBixLyWIMoEJoO88BODRxTbvgJJf0r6dKyrfrK0sg/hxV";

    // 支付宝公钥  在必看部分-->RSA2 设置查看中查看支付宝公钥  不是应用公钥
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgmKYjY+dKDXdTr6QNY7+Hz/0sCJHlTC6jybOZ3TvpicMLh7/bDgR2sbodCitrK8UppNvhovVKpmae6e3p2iL/TKxPJQwoGX93NJBQpnuJgB8C6dU/hRgIb1jnHOi2WD/qPLGlAD1H+1k3Cl9BGFlenUJQjAqnn0vrT6nfYq5vYgEz19kVPpu6Qrp7D2QaS2uWAKTKxg5V3FhVRIfMH10Axef3Zru3TWhwm5hgkViQHALrWH5+U8M5t6pzjNSp49613kjLrGlDcFGEZn5YkgZuWPhoRoZg9myKj+fXQadi5lMJBqP33Eaqt9WlMb1oRETceOjVIRqnCUwazBpzQEB1QIDAQAB";

    // 异步通知   需要公网可访问 采用内网穿透映射公网url
    // 将来放的就是具体异步通知请求
    public static String notify_url = "http://qwwh8d.natappfree.cc/async/notify.do";
    // 同步通知   需要公网可访问  采用内网穿透映射公网URL
    public static String return_url = "http://qwwh8d.natappfree.cc/sync/notify.do";//同步通知请求
    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关   dev 代表沙箱环境
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "D:\\";

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}